// Copyright  2004-2008 Backplane Ltd.
//
// This file is part of RegistryLookup
//
// RegistryLookup is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3 of the License, or (at your
// option) any later version.
//
// RegistryLookup is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License
// along with RegistryLookup. If not, see <http://www.gnu.org/licenses/>.

//	
//
//	Purpose: Return Codes for RegistryLookup
//   $Id$


#pragma once

#include <Common/ReturnCodes/ReturnCodes.h>

// Set up the IErrorInfo interface.
HRESULT SetupErrorInfo(HRESULT errcode, ...);

// Report an error, using the IErrorInfo interface if possible.
HRESULT ReportErrorInfo(HRESULT errcode, HWND hWndOwner = 0);

///////////////////////////////////////////////////////////////////////
// Success codes

///////////////////////////////////////////////////////////////////////
// Error codes
const HRESULT RL_E_NOMIMETYPE	= RL_ERROR_CODE(1); // The file extension '%s' has no registered mimetype associated with it.
const HRESULT RL_E_BADEXT		= RL_ERROR_CODE(2); // The file extension '%s' is not registered.
const HRESULT RL_E_BADARG		= RL_ERROR_CODE(3); // An invalid argument was passed to '%s'.
const HRESULT RL_E_BADROOTKEY	= RL_ERROR_CODE(4); // An invalid root key was specified in a request to '%s'.
const HRESULT RL_E_BADVALUE		= RL_ERROR_CODE(5); // Unable to %s the value '%s' in registry key '%s\\%s'.
const HRESULT RL_E_UNAUTH		= RL_ERROR_CODE(6); // The user did not authorise a %s of the value '%s' in registry key '%s\\%s'. Operation aborted.
const HRESULT RL_E_BADTYPEREAD	= RL_ERROR_CODE(7); // The %s registry type may not be written into a string variable.
const HRESULT RL_E_NOMEM		= RL_ERROR_CODE(8); // A memory allocation failed in '%s'. The system may be running low on virtual memory.
const HRESULT RL_E_OPENKEY		= RL_ERROR_CODE(9); // Unable to open registry key '%s\\%s'.
